package io.renren.modules.generator.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.generator.entity.TTrainingCheckEntity;

import java.util.List;
import java.util.Map;

/**
 * 考核信息表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2019-08-07 13:58:40
 */
public interface TTrainingCheckService extends IService<TTrainingCheckEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 新增  考核信息
     */
    Integer insertTTrainingCheck(TTrainingCheckEntity trainingCheckEntity);

    /**
     * 获取最新一条的数据
     */
    TTrainingCheckEntity getNewInfo();
    /**
     * 根据训练ID和考核次数查询考核记录
     * @param trainingId
     * @param chenkCount
     * @return
     */
    TTrainingCheckEntity selectByTrainingIdAndCount(Integer trainingId,Integer chenkCount);

    List<TTrainingCheckEntity> selectByTrainingId(Integer trainingId);
    /**
     * 更新考核记录
     * @param trainingCheckEntity
     * @return
     */
    int updateTrainingCheck(TTrainingCheckEntity trainingCheckEntity);
}

